﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [Table(Name = "dianyuancheiot")]
    public class DianYuanCheIOT
    {
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [Column(Name = "jtid")]
        [JsonProperty("jtid")]
        [Description("电源车具体ID")]
        public long Jtid { get; set; }

        #region 需要从传感器传过来的字段

        [Column(Name = "dpzt")]
        [JsonProperty("dpzt")]
        [Description("底盘状态")]
        public string Dpzt { get; set; }

        [Column(Name = "fdjzt")]
        [JsonProperty("fdjzt")]
        [Description("发动机状态")]
        public string Fdjzt { get; set; }

        [Column(Name = "xdcdy")]
        [JsonProperty("xdcdy")]
        [Description("蓄电池电压")]
        public long Xdcdy { get; set; }

        [Column(Name = "yxyl")]
        [JsonProperty("yxyl")]
        [Description("油箱油量")]
        public string Yxyl { get; set; }

        [Column(Name = "yh")]
        [JsonProperty("yh")]
        [Description("油耗")]
        public long Yh { get; set; }

        [Column(Name = "ltqy")]
        [JsonProperty("ltqy")]
        [Description("轮胎气压")]
        public string Ltqy { get; set; }

        [Column(Name = "sxwd")]
        [JsonProperty("sxwd")]
        [Description("水箱温度")]
        public string Sxwd { get; set; }

        [Column(Name = "hy")]
        [JsonProperty("hy")]
        [Description("滑油")]
        public string Hy { get; set; }

        [Column(Name = "xssd")]
        [JsonProperty("xssd")]
        [Description("行驶速度")]
        public string Xssd { get; set; }

        [Column(Name = "sczt")]
        [JsonProperty("sczt")]
        [Description("刹车状态")]
        public string Sczt { get; set; }

        [Column(Name = "zxwz")]
        [JsonProperty("zxwz")]
        [Description("最新位置")]
        public string Zxwz { get; set; }

        #endregion

        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
